//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "adminActions\fn_informplayer.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;
private ["_params","_text","_duration","_type","_fadeout","_target_player"];
if (isServer) then {
	TLOG_1("INFORM",_this);
};
if (!isDedicated) then {
	//[_text,_duration,_type,_fadeout,_target_player]
	_params = _this select 0;
	_text = _params select 0;
	_duration = _params select 1;
	_type = _params select 2;
	_fadeout = _params select 3;
	_target_player = _params select 4;
	
	if (_target_player != "" && { getplayerUID player != _target_player }) exitWith {};
	if (_text == "") exitWith {};

	titleText [_text,_type,_duration];
	if (_fadeout > 0) then {
		titleFadeOut _fadeout;
	};
};

TRACE("End");
TMFPROFILERSTOP;
